package com.js.service;


import com.js.dao.UserDao;
import com.js.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/*
 * Author：江松
 * Date：2023/4/25 9:49
 */
@Service
public class UserService {
    /**
     * 依赖注入
     */
    @Autowired
    private UserDao userDao;


    public User findUserByAccount(String account) {
        return userDao.findUserByAccount(account);
    }


    public User getUser(String account, String password) {
        return userDao.getUser(account, password);
    }


    public int addUser(User user) {
        return userDao.addUser(user);
    }


    public User listBooksByUserid(Integer userid) {
        return userDao.listBooksByUserid(userid);
    }
}
